﻿using System;
using System.Linq;

namespace WebEFDemo
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // got it!
                DemoConnectionContext db = new DemoConnectionContext();
                var user = db.Users.Where(u => u.userid == "000015881").FirstOrDefault();
                if (user != null)
                {
                    for (int i = 0; i < 9; i++)
                    {

                    }
                    Response.Write(user.userid + user.name);
                }
                else
                {
                    Response.Write("没有数据");
                }
            }
        }
    }
}